/*
 * @Description: 读取文件的工具方法
 * @Author: zhihong deng
 * @Date: 2021-05-25 22:28:36
 * @LastEditors: zhihong deng
 * @LastEditTime: 2021-05-25 22:40:29
 */
const fs = require('fs')
module.exports.getFileJsonData = (filePath) => {
    return new Promise((resolve,reject) => {
        fs.readFile(filePath,'utf-8',(error,data) => {
            if(error){
                reject(error)
            }else{
                resolve(data)
            }
        });
    });
}